package ling.common.domain.entity;

import com.easy.query.core.annotation.Column;
import com.easy.query.core.annotation.EasyWhereCondition;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

public interface IDeptEntity {
    Long getDeptId();

    void setDeptId(Long id);

    @Data
    public static abstract class DeptEntity<T extends Comparable<T> & Serializable>  implements IDeptEntity, IdEntity<T> {

        @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
        @ApiModelProperty(name = "所属部门id")
        Long deptId;
    }
    @Data
    public static class LongId extends DeptEntity<Long> {

        @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
        @Column(primaryKey = true,generatedKey = true)
        Long id;
    }

}
